debian: remove old leftovers from config file handling
authorMaximilian Engelhardt <maxi@daemonizer.de>
Thu, 5 Jan 2023 23:49:43 +0000 (00:49 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Wed, 1 Feb 2023 23:13:49 +0000 (00:13 +0100)
ae40dca3211ec35ca235a8a1f34c37e13093ff0d removed the call to the
debian/ucf-remove-fixup script from debian/rules. However the comment
explaining why this call was there was not removed. Additionally the
override_dh_ucf now only calls dh_ucf without doing anything else.

This commit removes the now unused debian/ucf-remove-fixup script, the
leftover comment referring to it and the dh_ucf override which doesn't
do anything but a call of dh_ucf.

Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de>
debian/rules
debian/ucf-remove-fixup [deleted file]

index d16b236f66f806ec877269bd6973f08c61f270c1..dd94e3d4dbd13bc19091df57f64cb5d8d1469965 100755 (executable)
@@ -328,8 +328,3 @@ override_dh_compress:
                debian/xenstore-utils/usr/bin
        :
        dh_compress -Xusr/share/doc/xen/html
-
-# We are dropping the config file /etc/default/xen which appeared in
-# earlier versions.  See ./ucf-remove-fixup for more details.
-override_dh_ucf:
-       dh_ucf
diff --git a/debian/ucf-remove-fixup b/debian/ucf-remove-fixup
deleted file mode 100755 (executable)
index 33937de..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/perl -wpi~
-
-# dh_ucf does not seem have a mode for dropping a ucf-managed config
-# file.  ucf and ucfr can be used to DTRT but are insufficiently
-# coooked.
-#
-# I think the right thing to do, when dropping a ucf-handled config
-# file, is
-#   (i) stop shipping the original file in /usr/share
-#   (ii) in postinst, do nothing
-#   (iii) in postrm purge, delete all traces
-
-# The result of (i) and (ii) is that the file remains recorded by
-# ucf and ucfr, but that the original version of the file is no
-# longer present on the user's machine.
-#
-# (iii) is exactly what dh_ucf puts into the postrm.
-#
-# So, we can be fairly future-proof with the following approach
-#   (i) stop shipping the original file in /usr/share
-#   (ii) call dh_ucf
-#   (iii) call ucf-remove-fixup (this script)
-#          which strips out the ucf stuff from the postinst
-
-use strict;
-use Carp;
-
-our ($package, $configfile);
-
-BEGIN {
-    die unless @ARGV == 2;
-    ($package, $configfile) = @ARGV;
-    @ARGV = ("debian/$package.postinst.debhelper");
-    $/ = '# End automatically added section'
-}
-
-next unless m{$configfile};
-confess "UNEXPECTED $_ ?" unless m{^(?=# Automatically added by dh_ucf)}m;
-
-print $` or die $!;
-$_ = $';
-next unless m{^(?!#)}m;
-s{\n}{\n# suppressed by ucf-remove-fixup\n};
-s{^(?!#)}{# }mg;